package leetcodecompetition.S121;

/**
 * @Author: Siantar
 * @Date: 2024-01-06-22:57
 * @Description: 1.0
 */
public class T100168 {
    public int minOperations(int[] nums, int k) {
        int t = k;
        for (int num : nums) {
            t ^= num;
        }
        int res = 0;
        while (t != 0) {
            res += t % 2;
            t /= 2;
        }
        return res;
    }
}
